# -*- coding:utf8 -*-
from sklearn import datasets, linear_model
from sklearn.model_selection import cross_validate

diabetes = datasets.load_diabetes()
X = diabetes.data[:150]
y = diabetes.target[:150]

lasso = linear_model.Lasso()
print(cross_validate(lasso, X, y, return_train_score=True))